import 'package:dio/dio.dart';

import '../../../core/errors/failure.dart';
import '../../../core/network/api_client.dart';

class VideoTagRepositoryImpl {
  final ApiClient apiClient;

  VideoTagRepositoryImpl(this.apiClient);

  Future<String> downloadZip(String path, String savePath, ProgressCallback? onReceiveProgress) async {
    final response = await apiClient.download(path, savePath, onReceiveProgress);
    if (response.statusCode == 200) {
      return savePath;
    } else {
      throw ServerFailure('downloadApk failed');
    }
  }
}
